//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.itheima.pinda.authority.model.ITreeNode;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;

@JsonInclude(Include.NON_NULL)
public class VueRouter implements ITreeNode<VueRouter, Long>, Serializable {
    private static final long serialVersionUID = -3327478146308500708L;
    @JsonIgnore
    private Long id;
    @JsonIgnore
    private Long parentId;
    @ApiModelProperty("路径")
    private String path;
    @ApiModelProperty("菜单名称")
    private String name;
    @ApiModelProperty("组件")
    private String component;
    @ApiModelProperty("重定向")
    private String redirect;
    @ApiModelProperty("元数据")
    private RouterMeta meta;
    @ApiModelProperty("是否隐藏")
    private Boolean hidden = false;
    @ApiModelProperty("总是显示")
    private Boolean alwaysShow = false;
    @ApiModelProperty("子路由")
    private List<VueRouter> children;

    public List<VueRouter> getChildren() {
        return this.children;
    }

    public Boolean getAlwaysShow() {
        return this.getChildren() != null && !this.getChildren().isEmpty();
    }

    public String getComponent() {
        return this.getChildren() != null && !this.getChildren().isEmpty() ? "Layout" : this.component;
    }

    public VueRouter() {
    }

    public Long getId() {
        return this.id;
    }

    public Long getParentId() {
        return this.parentId;
    }

    public String getPath() {
        return this.path;
    }

    public String getName() {
        return this.name;
    }

    public String getRedirect() {
        return this.redirect;
    }

    public RouterMeta getMeta() {
        return this.meta;
    }

    public Boolean getHidden() {
        return this.hidden;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setParentId(final Long parentId) {
        this.parentId = parentId;
    }

    public void setPath(final String path) {
        this.path = path;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setComponent(final String component) {
        this.component = component;
    }

    public void setRedirect(final String redirect) {
        this.redirect = redirect;
    }

    public void setMeta(final RouterMeta meta) {
        this.meta = meta;
    }

    public void setHidden(final Boolean hidden) {
        this.hidden = hidden;
    }

    public void setAlwaysShow(final Boolean alwaysShow) {
        this.alwaysShow = alwaysShow;
    }

    public void setChildren(final List<VueRouter> children) {
        this.children = children;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof VueRouter)) {
            return false;
        } else {
            VueRouter other = (VueRouter)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                Object this$parentId = this.getParentId();
                Object other$parentId = other.getParentId();
                if (this$parentId == null) {
                    if (other$parentId != null) {
                        return false;
                    }
                } else if (!this$parentId.equals(other$parentId)) {
                    return false;
                }

                Object this$path = this.getPath();
                Object other$path = other.getPath();
                if (this$path == null) {
                    if (other$path != null) {
                        return false;
                    }
                } else if (!this$path.equals(other$path)) {
                    return false;
                }

                label110: {
                    Object this$name = this.getName();
                    Object other$name = other.getName();
                    if (this$name == null) {
                        if (other$name == null) {
                            break label110;
                        }
                    } else if (this$name.equals(other$name)) {
                        break label110;
                    }

                    return false;
                }

                label103: {
                    Object this$component = this.getComponent();
                    Object other$component = other.getComponent();
                    if (this$component == null) {
                        if (other$component == null) {
                            break label103;
                        }
                    } else if (this$component.equals(other$component)) {
                        break label103;
                    }

                    return false;
                }

                Object this$redirect = this.getRedirect();
                Object other$redirect = other.getRedirect();
                if (this$redirect == null) {
                    if (other$redirect != null) {
                        return false;
                    }
                } else if (!this$redirect.equals(other$redirect)) {
                    return false;
                }

                label89: {
                    Object this$meta = this.getMeta();
                    Object other$meta = other.getMeta();
                    if (this$meta == null) {
                        if (other$meta == null) {
                            break label89;
                        }
                    } else if (this$meta.equals(other$meta)) {
                        break label89;
                    }

                    return false;
                }

                label82: {
                    Object this$hidden = this.getHidden();
                    Object other$hidden = other.getHidden();
                    if (this$hidden == null) {
                        if (other$hidden == null) {
                            break label82;
                        }
                    } else if (this$hidden.equals(other$hidden)) {
                        break label82;
                    }

                    return false;
                }

                Object this$alwaysShow = this.getAlwaysShow();
                Object other$alwaysShow = other.getAlwaysShow();
                if (this$alwaysShow == null) {
                    if (other$alwaysShow != null) {
                        return false;
                    }
                } else if (!this$alwaysShow.equals(other$alwaysShow)) {
                    return false;
                }

                Object this$children = this.getChildren();
                Object other$children = other.getChildren();
                if (this$children == null) {
                    if (other$children != null) {
                        return false;
                    }
                } else if (!this$children.equals(other$children)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof VueRouter;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $parentId = this.getParentId();
        result = result * 59 + ($parentId == null ? 43 : $parentId.hashCode());
        Object $path = this.getPath();
        result = result * 59 + ($path == null ? 43 : $path.hashCode());
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $component = this.getComponent();
        result = result * 59 + ($component == null ? 43 : $component.hashCode());
        Object $redirect = this.getRedirect();
        result = result * 59 + ($redirect == null ? 43 : $redirect.hashCode());
        Object $meta = this.getMeta();
        result = result * 59 + ($meta == null ? 43 : $meta.hashCode());
        Object $hidden = this.getHidden();
        result = result * 59 + ($hidden == null ? 43 : $hidden.hashCode());
        Object $alwaysShow = this.getAlwaysShow();
        result = result * 59 + ($alwaysShow == null ? 43 : $alwaysShow.hashCode());
        Object $children = this.getChildren();
        result = result * 59 + ($children == null ? 43 : $children.hashCode());
        return result;
    }

    public String toString() {
        return "VueRouter(id=" + this.getId() + ", parentId=" + this.getParentId() + ", path=" + this.getPath() + ", name=" + this.getName() + ", component=" + this.getComponent() + ", redirect=" + this.getRedirect() + ", meta=" + this.getMeta() + ", hidden=" + this.getHidden() + ", alwaysShow=" + this.getAlwaysShow() + ", children=" + this.getChildren() + ")";
    }
}
